appName=app_IOMThread
springXmlName=applicationContext.xml
appCode=FILE
export JAVA_HOME=/jdk/jdk1.7.0_80
#JPROFILER_ARGS="-agentpath:/iom/ztool/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8089,nowait"
DEBUG_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,address=8859"
IOM_SYS_ARGS="-DcontrollerCode=${appCode} "

if [ ` ps -ef |grep ${appName} | grep -v grep | wc -l ` -eq 0 ]
then
        INFLIB=./lib:.:${JAVA_HOME}/lib
				tag=IOMThread;
				exe_option="-Xms2048m -Xmx2048m  -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError  -Djava.ext.dirs=$INFLIB -Dfile.encoding=GBK  -Duser.language=zh -Duser.region=CN -Dcom.sun.management.jmxremote.port=19880 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false  -DPGM_ID=${appName} -Dlog4j.configuration=file:./classes/cfg/log4j.properties"
				
				nohup ${JAVA_HOME}/bin/java ${JPROFILER_ARGS}  ${IOM_SYS_ARGS} -cp :$tag:./classes $exe_option com.ztesoft.iom.process.IomController ${appCode} ${springXmlName} > logs/systemout.log 2>&1 &

else    
	echo "\nWarning: can not startup ${appName} program,it is running.........!\n" 
fi
